package Run;


import java.util.Hashtable;
import java.util.Map;


import Model.Planet.Planet;
import Presenter.LoadMenuPresenter;
import View.GUI;


/**
 *Class that runs the game
 *
 */
public class Engine{
	/**
	 * hashtable of all planets
	 */
	public static Map<String,Planet> planets = new Hashtable<String, Planet>();
	
	/**
	 * computes distance between the point (x,y) to the planet
	 * @param x
	 * @param y
	 * @param p2
	 * @return
	 */
	public static double distance(int x, int y, Planet p2){
		return Math.sqrt(Math.pow((x - p2.getCoord().x), 2) 
		        + Math.pow((y - p2.getCoord().y), 2));
	}
	
	/**
	 * sets things into motion
	 * @param args
	 */
	public static void main(String[] args){
		final GUI frame = GUI.getInstance();
		frame.setContentPane(new LoadMenuPresenter().getView(), 500, 400);
	}
	
	public String toString(){
		return super.toString();
	}
}